import Layout from '@/views/Layout.vue';
import Vue from 'vue'
import VueRouter from "vue-router";
import ArticleDetail from "@/views/ArticleDetail.vue"
import Article from "@/views/Article.vue"
Vue.use(VueRouter)

const router = new VueRouter({
    routes: [
        // 路径为'/"时，重定向到"/home"  使用redirect属性(使改变方向)
        { path: '/', redirect: '/home' },
        { path: '/detail', component: ArticleDetail },
        // *匹配任意路径，跳转到不存在页面
        { path: '*', component: notfind }
    ]
})

export default router